<?php
namespace Xcx\Controller;

use Xcx\Common\ErrorCode;
use Xcx\Model\UsersModel;
class UserController extends BaseController
{
    protected $User;
    public function __construct()
    {
        parent::__construct();
        $this->User = new UsersModel($this->uid);
    }

    public function getUserInfo()
	{
		$userInfo = $this->User->getUserInfo();
		
		$code = ErrorCode::$Fail;
		if ($userInfo) {
			$code = 0;
		}
		
		$this->ajaxReturn(array('code'=>$code,'userInfo'=>$userInfo));
	}
}